<template>
  <div>
    <h2>修改密码</h2>
        <el-form label-width="100px">
<el-row :gutter="24">
  <el-col :span="10">
         <el-form-item label="旧密码">
                <el-input type="text" v-model="oldPassword"/>
            </el-form-item>
  </el-col>
</el-row>
         
<el-row :gutter="24">
  <el-col :span="10">
       <el-form-item label="新密码">
                <el-input type="text" v-model="newPassword" />

            </el-form-item>
  </el-col>
</el-row>
<el-row :gutter="24">
  <el-col :span="10">
          <el-form-item >
                    <el-button @click="save()" type="primary">保存</el-button>
            </el-form-item>
  </el-col>
</el-row>
 
          
        </el-form>  



  </div>
</template>

<script>
import * as Api from "@/api/Api.js";
import * as RoundApi from "@/api/RoundApi.js";
import * as Config from "@/api/Config.js";

export default {
  data() {
    return {
     oldPassword:'',
     newPassword:''
    };
  },

  methods: {
    save() {
      RoundApi.changPassword(this,{
        oldPassword:this.oldPassword,
        newPassword:this.newPassword
      }).then(res => {
          console.log(res)
     
     if (res.retCode) {
           this.$message('修改成功')
        }else{
this.$message(res.message)
          
        }
      });
    }
  },
  mounted() {}
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
